package com.bst;

public class Test {
    public static void main(String[] args) {
        BST<Integer> bst = new BST<>();
        Integer[] integers = {5, 3, 6, 8, 4 ,2};
        for (int i = 0; i < integers.length; i++) {
            bst.add(integers[i]);
        }
        bst.preOrder();
        System.out.println("\n" + "中序遍历");
        bst.inOrder();
        System.out.println();
        bst.postOrder();
        System.out.println();
        bst.preOrderNR();
        System.out.println("层序遍历（广度优先遍历）");
        bst.levelOrder();
        bst.removeMin();
        System.out.println("\n" + "删除最小元素");
        bst.inOrder();

    }
}
